package org.example;

import java.util.LinkedList;
import java.util.Queue;

public class QueueApp {
    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        // O(1)
        queue.add(1);
        queue.add(2);
        queue.add(3);

        // O(1)
        Integer peek = queue.peek();

        // O(1)
        Integer poll = queue.poll();
        queue.remove();

        // O(1)
        queue.isEmpty();

        // O(1)
        queue.size();

        // O(n)
        while (!queue.isEmpty()) {
            int tmp = queue.poll();
            System.out.println(tmp);
        }
    }
}
